<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>回归优惠券</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="刘代应">
	<meta name="hashcode" content="-390920206">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "-390920206";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("returncoupon.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建回归优惠券"
  			,"inport":"导入回归优惠券"
  			,"update":"修改回归优惠券"
  			,"detail":"回归优惠券详情"
  			
  			
			
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>

<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#returncouponForm").form({
		"":function(){}
		,"tbReturnCoupon.tbrcId":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"tbReturnCoupon.tbrcMember":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"tbReturnCoupon.tbrcYq":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"tbReturnCoupon.tbrcBrand":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"tbReturnCoupon.tbrcCoupon":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"tbReturnCoupon.tbrcGet":function(el){
		}
		,"tbReturnCoupon.tbrcAddTime":function(el){
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>
 
<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>




<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="TbReturnCoupon" id="returncouponForm" name="returncouponForm" target="jsoniframe" action="returncoupon.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt" style="display:none;">
				温馨提示：请仔细填写回归优惠券相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
			
			
					
	{{lz.set("tbrcId_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcId"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"tbrcId"))))}}
	{{lz.set("tbrcId_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$tbrcId}}
	<dl lz:if="{{tbrcId_editable||tbrcId_readonly}}" class="tbrcId hidden " major  ref="tbrcId">
		<dt>编　　号:</dt>
		<dd lz:if="{{tbrcId_editable}}" input="hidden">
			<lz:block lz:if="{{tbReturnCoupon$tbrcId}}">
				{{tbReturnCoupon$tbrcId}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcId}}">
			<input type="hidden" value="{{lz.htm(tbReturnCoupon.tbrcId)}}" name="tbReturnCoupon.tbrcId" id="tbrcId" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcId_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcId">{{tbReturnCoupon.tbrcId}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcId$||tbReturnCoupon.tbrcId)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcId}}
					
	{{lz.set("tbrcMember_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcMember"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"tbrcMember"))))}}
	{{lz.set("tbrcMember_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$tbrcMember}}
	<dl lz:if="{{tbrcMember_editable||tbrcMember_readonly}}" class="ribs tbrcMember  " major  ref="tbrcMember">
		<dt>会　　员:</dt>
		<dd lz:if="{{tbrcMember_editable}}" input="number">
			<lz:block lz:if="{{tbReturnCoupon$tbrcMember}}">
				{{tbReturnCoupon$tbrcMember}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcMember}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="tbReturnCoupon.tbrcMember" id="tbrcMember"  value="{{lz.htm(tbReturnCoupon.tbrcMember)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入回归优惠券的会员</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcMember_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcMember">{{tbReturnCoupon.tbrcMember}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcMember$||tbReturnCoupon.tbrcMember)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcMember}}
					
	{{lz.set("tbrcYq_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcYq"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"tbrcYq"))))}}
	{{lz.set("tbrcYq_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$tbrcYq}}
	<dl lz:if="{{tbrcYq_editable||tbrcYq_readonly}}" class="ribs tbrcYq  " major  ref="tbrcYq">
		<dt>邀 请 人:</dt>
		<dd lz:if="{{tbrcYq_editable}}" input="number">
			<lz:block lz:if="{{tbReturnCoupon$tbrcYq}}">
				{{tbReturnCoupon$tbrcYq}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcYq}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="tbReturnCoupon.tbrcYq" id="tbrcYq"  value="{{lz.htm(tbReturnCoupon.tbrcYq)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入回归优惠券的邀请人</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcYq_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcYq">{{tbReturnCoupon.tbrcYq}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcYq$||tbReturnCoupon.tbrcYq)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcYq}}
					
	{{lz.set("tbrcBrand_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcBrand"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"tbrcBrand"))))}}
	{{lz.set("tbrcBrand_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$tbrcBrand}}
	<dl lz:if="{{tbrcBrand_editable||tbrcBrand_readonly}}" class="ribs tbrcBrand  " major  ref="tbrcBrand">
		<dt>品　　牌:</dt>
		<dd lz:if="{{tbrcBrand_editable}}" input="number">
			<lz:block lz:if="{{tbReturnCoupon$tbrcBrand}}">
				{{tbReturnCoupon$tbrcBrand}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcBrand}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="tbReturnCoupon.tbrcBrand" id="tbrcBrand"  value="{{lz.htm(tbReturnCoupon.tbrcBrand)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入回归优惠券的品牌</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcBrand_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcBrand">{{tbReturnCoupon.tbrcBrand}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcBrand$||tbReturnCoupon.tbrcBrand)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcBrand}}
					
	{{lz.set("tbrcCoupon_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcCoupon"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"tbrcCoupon"))))}}
	{{lz.set("tbrcCoupon_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$tbrcCoupon}}
	<dl lz:if="{{tbrcCoupon_editable||tbrcCoupon_readonly}}" class="ribs tbrcCoupon  " major  ref="tbrcCoupon">
		<dt>优 惠 券:</dt>
		<dd lz:if="{{tbrcCoupon_editable}}" input="number">
			<lz:block lz:if="{{tbReturnCoupon$tbrcCoupon}}">
				{{tbReturnCoupon$tbrcCoupon}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcCoupon}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="tbReturnCoupon.tbrcCoupon" id="tbrcCoupon"  value="{{lz.htm(tbReturnCoupon.tbrcCoupon)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入回归优惠券的优惠券</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcCoupon_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcCoupon">{{tbReturnCoupon.tbrcCoupon}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcCoupon$||tbReturnCoupon.tbrcCoupon)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcCoupon}}
					
	{{lz.set("tbrcGet_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcGet"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"tbrcGet"))))}}
	{{lz.set("tbrcGet_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$tbrcGet}}
	<dl lz:if="{{tbrcGet_editable||tbrcGet_readonly}}" class="ribs tbrcGet  " major  ref="tbrcGet">
		<dt>领取情况:</dt>
		<dd lz:if="{{tbrcGet_editable}}" input="select">
			<lz:block lz:if="{{tbReturnCoupon$tbrcGet}}">
				{{tbReturnCoupon$tbrcGet}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcGet}}">
		 	<select class="narrow" id="tbrcGet" name="tbReturnCoupon.tbrcGet">
		 		<option value="">请选择</option>
				<option value="1" selected='{{tbReturnCoupon.tbrcGet=="1"?"selected":""}}'>未领取</option>
				<option value="2" selected='{{tbReturnCoupon.tbrcGet=="2"?"selected":""}}'>已领取</option>
		 	</select>
	 	 </lz:block>
	 	 
	 	 <em>请选择回归优惠券的领取情况</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcGet_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcGet">{{tbReturnCoupon.tbrcGet}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcGet$||tbReturnCoupon.tbrcGet)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcGet}}
					
	{{lz.set("tbrcAddTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"tbrcAddTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"tbrcAddTime"))))}}
	{{lz.set("tbrcAddTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&true)||(edittype=='detail'))}}
				
	
	{{before$tbrcAddTime}}
	<dl lz:if="{{tbrcAddTime_editable||tbrcAddTime_readonly}}" class="tbrcAddTime  " major  ref="tbrcAddTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{tbrcAddTime_editable}}" input="datetime">
			<lz:block lz:if="{{tbReturnCoupon$tbrcAddTime}}">
				{{tbReturnCoupon$tbrcAddTime}}
			</lz:block>
			<lz:block lz:if="{{!tbReturnCoupon$tbrcAddTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="tbReturnCoupon.tbrcAddTime" id="tbrcAddTime"  value="{{tbReturnCoupon.tbrcAddTime$}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请选择回归优惠券的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{tbrcAddTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="tbrcAddTime">{{tbReturnCoupon.tbrcAddTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(tbReturnCoupon.tbrcAddTime$||tbReturnCoupon.tbrcAddTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$tbrcAddTime}}
			
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{tbReturnCoupon.tbrcId}}" name="tbReturnCoupon.tbrcId" id="tbrcId" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				
				
				
				
				
				
				
				
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/coupons/returncoupon.edit.html?edittype=update&id={{tbReturnCoupon.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				
				
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteReturncoupon('{{tbReturnCoupon.id}}','{{tbReturnCoupon.tbrcId}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>





 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/coupons/returncoupon.edit.html",document.title,"/admin/");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/coupons/returncoupon.edit.html");
		}else{
			$.closeModalDialog();
		}
	}



	/**
	* 删除回归优惠券
	**/
	function deleteReturncoupon(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除回归优惠券",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/coupons/returncoupon.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}

</script>
</html>